--下线设置坐席状态为下线


local username=event:getHeader("from-user");

if(username ==nil)then
        return "break";
end;

freeswitch.consoleLog("info",username.."解除注册");

local api=freeswitch.API();

local cmd="callcenter_config agent set status "..username.." 'Logged Out'";

freeswitch.consoleLog("info","执行命令"..cmd);
local reply=api:executeString(cmd);

freeswitch.consoleLog("info","执行callcenter下线结果结果"..reply);

